package com.leyou.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 *
 *   错误信息提示枚举类
 *
 *
 * @Author: Rose
 * @Date: 2021/2/11 19:14
 * @version: 1.0.0
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnum {

    PRICE_CANNOT_BE_NULL(400, "价格不能为空"),
    CATEGORY_NOT_FOUND(404, "商品分类没查到！"),
    BRAND_NOT_FOUND(404, "品牌未找到！"),
    BRAND_LIST_NOT_FOUND(404, "品牌未找到！"),
    BRAND_CID_NOT_FOUND(404, "品牌cid未找到！"),
    BRAND_SAVE_ERROR(500, "新增品牌失败！"),
    BRAND_DELETE_ERROR(500, "删除品牌失败！"),
    UPLOAD_FILE_ERROR(500, "文件上传失败！"),
    INVALID_FILE_TYPE(500, "无效的文件类型！"),

    SPECGROUP_NOT_FOUND(404, "商品规格组未查到！"),
    SPECGROUP_NAME_ISNULL(404, "商品规格组的名称为空！"),
    SPECGROUP_CID_ISNULL(404, "商品规格组的分类cid为空！"),
    SPECGROUP_ID_ISNULL(404, "商品规格组的主键id为空！"),
    SPECGROUP_NAME_EXISTS(404, "商品规格组的名称已经存在！"),
    SPECGROUP_CREATED_FAIL(404, "商品规格组新增失败！"),
    SPECGROUP_UPDATED_FAIL(404, "商品规格组更新失败！"),
    SPECGROUP_DELETED_FAIL(404, "商品规格组删除失败！"),
    SPECGROUP_NOT_EXISTS(404, "商品规格组未找到！"),


    SPECPARAM_GID_ISNULL(404, "商品规格参数的组gid为空！"),
    SPECPARAM_PARAM_ISNULL(404, "商品规格参数为空！"),
    SPECPARAM_NAME_ISNULL(404, "商品规格参数的名称为空！"),
    SPECPARAM_NUMERIC_ISNULL(404, "商品规格参数的数字类型参数为空！"),
    SPECPARAM_NNIT_ISNULL(404, "商品规格参数的数字类型单位为空！"),
    SPECPARAM_NOT_FOUND(404, "商品规格参数未找到！"),
    SPECPARAM_CREATED_FAIL(404, "商品规格参数新增失败！"),
    SPECPARAM_DELETED_FAIL(404, "商品规格参数删除失败！"),
    SPECPARAM_UPDATED_FAIL(404, "商品规格参数更新失败！"),
    SPECPARAM_ID_ISNULL(404, "商品规格参数主键id不能为空"),


    GOODS_NOT_FOUND(404, "商品未找到！"),
    GOODS_SAVE_ERROR(404, "商品新增失败！"),
    GOODS_UPDATE_ERROR(404, "商品更新失败！"),
    STOCK_NOT_ENOUGH(500, "库存不足！"),

    SPUDETAIL_NOT_FOUND(404, "商品详情未找到!"),
    GOODS_DETAIL_NOT_FOUND(404, "商品详情未找到!"),
    GOODS_SKU_NOT_FOUND(404, "商品SKU不存在!"),
    GOODS_STOCK_NOT_FOUND(404, "商品库存未找到！"),
    GOODS_ID_CANNOT_BE_NULL(400, "商品ID不能为空！"),

    INVALID_USER_DATA_TYPE(400, "用户数据类型无效"),
    INVALID_USERNAME_PASSWORD(400, "用户名或密码错误"),
    INVALID_VERIFY_CODE(400, "无效的验证码"),
    PHONE_IS_NULL(400, "用户手机号码不能为空"),
    DATA_TRANSFER_ERROR(400, "数据转换异常"),
    CREATE_TOKEN_ERROR(500, "用户凭证生成失败!"),
    UNAUTHORIZED(403, "用户未授权"),

    CART_NOT_FOUND(404, "购物车为空！"),

    ORDER_NOT_FOUND(404, "订单不存在！"),
    ORDER_DETAIL_NOT_FOUND(404, "订单详情不存在！"),
    ORDER_STATUS_NOT_FOUND(404, "订单状态不存在！"),
    ORDER_STATUS_ERROR(400, "订单状态异常！"),

    CREATE_ORDER_ERROR(400, "创建订单失败!"),

    INVALID_SIGN_ERROR(400, "签名无效!"),
    WX_PAY_ORDER_FAIL(500, "微信下单失败!"),
    INVALID_ORDER_PARAM(400, "订单参数有误!"),
    UPDATE_ORDER_STATUS_ERROR(400, "更新订单状态有误!"),


    ;

    /**
     * 响应状态码
     */
    private Integer code;
    /**
     * 响应状态消息
     */
    private String msg ;


}
